/* 
 * File:   RldSerialPort.h
 * Author: batista
 *
 * Created on 7 de Março de 2013, 13:35
 */

#ifndef RLDSERIALPORT_H
#define	RLDSERIALPORT_H
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <sys/time.h>
#include <sstream>
#include <vector>
#include <SerialStream.h>
#include <unistd.h>
#include "ShowMsg.h"

using namespace std;
using std::string;
using namespace LibSerial;


//class SerialStream;

class RldSerialPort {
public:
    RldSerialPort();
    virtual ~RldSerialPort();
    void SetSerialPort(string serial_name);
    bool WriteInPort(char bytes[]);
    string ReadAllInPort();
    char ReadCharInPort();
    bool VerifyPort();
    void ClosePort();
 
private:
    SerialStream *m_port;
};

#endif	/* RLDSERIALPORT_H */

